package com.yangjie.sandbox;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class Test extends Base<Integer> {
	private void test() {
		ParameterizedType type = (ParameterizedType)getClass().getGenericSuperclass();
		Type[] typeArray = type.getActualTypeArguments();
		System.out.println(".");
	}
	
	public static void main(String[] args) {
//		new Test().test();
		try {
			Test tmp = new Test();
			Method method = tmp.getClass().getDeclaredMethod("test", new Class[]{});
			try {
				method.invoke(tmp, null);
			} catch (IllegalArgumentException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (InvocationTargetException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
